home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1997 May / PC Plus Super CD Issue 127 (May 1997).iso / wacom / dos / wacomd.inf < prev    next >
Encoding:
Text File  |  1996-08-19  |  7.8 KB  |  321 lines

  1. DefineVariables
  2. Number [ErrCount]
  3. Directory [windir]
  4. Directory [winsdir]
  5. Directory [FullExeName]
  6. Logical [EnKeyb]
  7. Logical [NetAvail]
  8. Logical [MathPres]
  9. Logical [modifyaxbat]
  10. Logical [InstallOverOldMouse]
  11. Logical [ModifyFile]
  12. Text [DispType]
  13. Number [XMSAvail]
  14. Number [ExtmemPagesActive]
  15. Number [ExtmemPagesAvail]
  16. Number [ExtMemAvail]
  17. Number [ExtMemPres]
  18. Number [ExpMempgavail]
  19. Number [ExpMempgactive]
  20. Text [osver]
  21. Text [DosVer]
  22. Text [EmsVer]
  23. Text [ProdExecutable]
  24. Text [InstDir]
  25. TextArray [Array1]
  26. EndDefineVariables
  27.  
  28. [EnKeyb] := NoCharacter
  29. [NetAvail] := NoCharacter
  30. [MathPres] := NoCharacter
  31. [modifyaxbat] := YesCharacter
  32. [InstallOverOldMouse] := YesCharacter
  33. Do SetupDisplay
  34. Do CheckHardware
  35.  
  36. Run [InstallFromDirectory]what_os.com Quietly 
  37. If OSExitCode = 10
  38.   Dialog PressAkey
  39.         You cannot run the DOS install program from inside of Windows. 
  40.     To install WACOM for Windows select file-run from the Program 
  41.     Manager menu and type A:\SETUP.
  42.   EndDialog
  43.   SoLong
  44. Endif
  45. If OSExitCode = 30
  46.   Dialog PressAkey
  47.         You cannot run the DOS install program from NT.
  48.         To install WACOM for Windows NT select file-run from the Program 
  49.     Manager menu and type A:\SETUP.
  50.   EndDialog
  51.   SoLong
  52. Endif
  53.  
  54. if [errcount] > 1
  55. Dialog UseHeader "Encountered Some Problems" LightGrayOnBlue
  56. Our installation has encounterd the following problems,
  57. you can continue to install or exit installation.
  58. [Array1][1]
  59. [Array1][2]
  60. [Array1][3]
  61. [Array1][4]
  62. [Array1][5]
  63. [Array1][6]
  64. [Array1][7]
  65. EndDialog
  66. endif
  67.  
  68. :start
  69. GetMenuChoice UseHeader "WACOM Installation"
  70. Install WACOM for DOS
  71.    ; Install the WACOM mouse emulation driver for DOS
  72. Exit Installation
  73.    ;           Quit
  74. EndGetMenuChoice
  75. InCase Choice is
  76. =1: Do InstallDOS
  77. =2: SoLong
  78. EndIncase
  79. SoLong
  80. goto start
  81.  
  82. Procedure InstallDOS
  83.  
  84. Do CopyDOSFiles
  85.  
  86. If MouseDriverLoaded 
  87. SetPopupBorderTo double
  88. TextBox @xy(Center,3) WhiteOnRed
  89. "  Another mouse driver is already loaded in memory!  "
  90. "You can only have one mouse driver loaded at any time."
  91. EndTextBox
  92. SetPopupBorderTo single
  93. EndIf
  94.  
  95. Dialog [InstallOverOldMouse]
  96.     This installer will attempt to remove any existing mouse drivers from 
  97.     your CONFIG.SYS or AUTOEXEC.BAT files, and automatically load the 
  98.     WACOM mouse driver in your AUTOEXEC.BAT file.
  99.     "                                                                     "
  100.     "                       Would you like to continue?                   "
  101. EndDialog
  102. SetBottomLineTo BlankString
  103.  
  104. ClearScreen
  105.  
  106. If [InstallOverOldMouse] = NoCharacter
  107.     [modifyaxbat] := NoCharacter
  108.     GoTo doneAutoExec
  109. EndIf
  110.  
  111. [FullExeName] := [InstallationDirectory]\WMOUSE.COM
  112.  
  113. ;; disable instalit's notification of sys file modification 
  114. ;; and location inquiry
  115. SetModifyModeTo Modify
  116. NoSysFileConfirmation
  117.  
  118. ExamineTextFile c:\config.sys
  119. [Number1] := LineNumberWith (device=,mouse.sys,)
  120. if [Number1] <> 0
  121.     [String1] := Line [Number1]
  122.     Dialog PressAKey
  123.         The line "[String1]" in your CONFIG.SYS File is being
  124.         replaced with "REM [String1]".
  125.     EndDialog
  126.     ModifyTextFile c:\config.sys Quietly
  127.         DeleteLine [Number1]
  128.         InsertAtLine [Number1] "REM [String1]"
  129.     EndModifyTextFile
  130. Endif
  131. ForgetTextFile
  132.  
  133. ExamineTextFile c:\autoexec.bat
  134.  
  135. ;; loop thru all lines of autoexec
  136. [Number3] := 1
  137. [Number4] := TextLineCount
  138.  
  139. :topExamAutoExec
  140. If [Number3] > [Number4]
  141.     GoTo doneExamAutoExec
  142. EndIf
  143. [String2] := Line [Number3]
  144. If [String2] contains rem
  145.     IncrementNumber [Number3]
  146.     GoTo topExamAutoExec
  147. EndIf
  148.  
  149. ;; add a slash to take care of cases where line ends without  
  150. ;; 'exe','com', or some paramteters
  151. [String1] := [String2] /
  152. If [String1] contains mouse /
  153.     GoTo doneExamAutoExec
  154. EndIf
  155. If [String1] contains mouse.com
  156.     GoTo doneExamAutoExec
  157. EndIf
  158. If [String1] contains mouse.exe
  159.     GoTo doneExamAutoExec
  160. EndIf
  161.  
  162. IncrementNumber [Number3]
  163. GoTo topExamAutoExec
  164. :doneExamAutoExec
  165.  
  166. ;; check if we found our own driver
  167. If [String1] contains wmouse
  168.     Dialog PressAKey
  169.         The line "[String2]" in your AUTOEXEC.BAT File is being
  170.         modified to run the new wmouse program.
  171.     EndDialog
  172.     ModifyTextFile c:\autoexec.bat Quietly
  173.         DeleteLine [Number3]
  174.         InsertAtLine [Number3] [FullExeName]
  175.     EndModifyTextFile
  176.     GoTo doneAddWmouse
  177. EndIf
  178. If [Number3] <= [Number4]
  179.     Dialog [modifyaxbat]
  180.         In order to have the WACOM driver load at boot time,
  181.         the line "[String2]" in your AUTOEXEC.BAT file should 
  182.         be replaced with "REM [String2]".
  183.         The line "[FullExeName]" should be added. 
  184.         
  185.         Would you like the installer to make these changes?
  186.     EndDialog
  187.     If [modifyaxbat]
  188.         ModifyTextFile c:\autoexec.bat Quietly
  189.             DeleteLine [Number3]
  190.             InsertAtLine [Number3] "REM [String2]"
  191.         EndModifyTextFile
  192.         GoTo foundWIN
  193.     Endif
  194.     [modifyaxbat] := NoCharacter
  195.     GoTo doneAutoExec
  196. Endif
  197.  
  198.  
  199. ;; loop thru all lines of autoexec
  200. [Number3] := 1
  201. [Number4] := TextLineCount
  202.  
  203. :toplook4WIN
  204. If [Number3] > [Number4]
  205.     GoTo foundNoWIN
  206. EndIf
  207. [String2] := Line [Number3]
  208. If [String2] contains rem
  209.     IncrementNumber [Number3]
  210.     GoTo toplook4WIN
  211. EndIf
  212. ;; add a slash to take care of cases where line ends without  
  213. ;; 'exe','com', or some paramteters
  214. [String1] := [String2] /
  215.  
  216. If [String1] contains win /
  217.     GoTo foundWin
  218. EndIf
  219. If [String1] contains win.com
  220.     GoTo foundWIN
  221. EndIf
  222.  
  223. IncrementNumber [Number3]
  224. GoTo toplook4WIN
  225.  
  226. :foundWIN
  227. ModifyTextFile c:\autoexec.bat Quietly
  228.     InsertAtLine [Number3] [FullExeName]
  229. EndModifyTextFile
  230. GoTo forgetit
  231.  
  232. :foundNoWin
  233. ModifyTextFile c:\autoexec.bat Quietly
  234.     InsertAtLine End [FullExeName]
  235. EndModifyTextFile
  236. :doneAddWmouse
  237.  
  238. :forgetit
  239. ForgetTextFile
  240.  
  241. :doneAutoExec
  242.  
  243. SetShadows OFF
  244. TextBox @xy(Center,2)
  245.     The following WMOUSE.TXT file was copied to your [InstallationDirectory] directory.
  246.     It contains updated information about the WACOM mouse emulation driver.
  247.  
  248.     "                       Press ESC to Continue"
  249. EndTextBox
  250. SetPopupBorderTo double
  251. SetBottomLineTo "                          PgUp PgDn Home End ESC                        "
  252. BrowseFile [InstallationDirectory]\WMOUSE.TXT @xy(5,9) @xy(77,19) YellowOnBlue UseHeader "README.TXT"
  253. SetBottomLineTo BlankString
  254. ClearScreen
  255. SetShadows ON
  256.  
  257. If [modifyaxbat]
  258. Dialog PressAKey
  259.     Your WACOM Tablet has been setup for use with DOS programs. You 
  260.     must restart your computer to have the use of the tablet in DOS.
  261.  
  262.     This concludes the WACOM software installation for DOS.
  263. EndDialog
  264. GoTo leaveInstallDOS
  265. Endif
  266. Dialog PressAKey
  267.     The WACOM Tablet drivers have been successfully copied. If you
  268.     would like to load the WACOM mouse driver, go to the 
  269.     [InstallationDirectory] directory and type WMOUSE.
  270.     
  271.     Your AUTOEXEC.BAT file was not modified, you can run the installer
  272.     program at a later date to modify your AUTOEXEC.BAT file and have
  273.     your tablet driver automatically load at boot time.
  274.     
  275.     This concludes the WACOM software installation for DOS.
  276. EndDialog
  277.  
  278. :leaveInstallDOS
  279. EndProcedure
  280.  
  281. Procedure CopyDOSFiles
  282.  
  283. SetBottomLineTo "          Enter the Destination Directory  or  Press <CtrlX> to Quit            "
  284. DetermineInstallationDirectory C:\WACOM
  285. SetBottomLineTo BlankString
  286.  
  287. OpenCopyWindow
  288. CopyFiles
  289.     wmouse.com
  290.     wmouse.txt
  291.     wtest.com
  292.     wtest.txt
  293. EndCopyFiles
  294. CopyFiles from [InstallFromDirectory]..\
  295.     readme.txt
  296. EndCopyFiles
  297. CloseCopyWindow
  298.  
  299. EndProcedure
  300.  
  301. Procedure SetupDisplay
  302. SetBackGroundCharTO b0
  303. SetPopupAttrTo BlueOnLightGray
  304. EndProcedure
  305.  
  306. Procedure CheckHardware
  307. [Number3] := 1
  308. [windir] := [WindowsDirectory]
  309. [winsdir] := [WindowsSystemDirectory]
  310. [ExtmemPagesActive] := ExtendedMemoryPagesActive
  311. [ExtmemPagesAvail] := ExtendedMemoryPagesAvailable
  312. [ExtMemAvail] := ExtendedMemoryAvailable
  313. [ExtMemPres] := ExtendedMemoryPresent
  314. [ExpMempgAvail] := ExpandedMemoryPagesAvailable
  315. [ExpMempgActive] := ExpandedMemoryPagesActive
  316. [osver] := OSVersion
  317. [DosVer] := DOSVersion
  318. [EmsVer] := EMSVersion
  319. [Errcount] := [Number3]
  320. EndProcedure
  321.